<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<jsp:include page="../include/mainheader.jsp" />
<script type="text/javascript" src="<c:url value='/htmlRes/js/high_chart/highcharts.js'/>"></script>
<script type="text/javascript" src="<c:url value='/htmlRes/js/datepicker/jquery.ui.core.js'/>"></script>
<script type="text/javascript" src="<c:url value='/htmlRes/js/datepicker/jquery.ui.datepicker.js'/>"></script>
<script type="text/javaScript">
<!--
	$(document).ready(function(){
		$('.graph_box').each(function(index){
			var charId = $(this).attr('id');
			if($('#'+charId).html() != ""){
				var chartData = eval("("+$('#'+charId).html()+")");
				$('#'+charId).highcharts(chartData);
			}else{
				$('#'+charId).html("데이터가 없습니다.");
				$('#'+charId).css("text-align", "center");
				$('#'+charId).css("padding", "30px 0 0 0");
			}
		});
		
		$( "#searchSdate" ).datepicker();
		$( "#searchEdate" ).datepicker();
	});
	
	function searchForm(){
		$('#listForm').attr('action', '<c:url value="/main.do"/>');
		$('#listForm').submit();
	}
-->
</script>
<!-- contents s -->
	<div class="container" id="container">
		<span class="round lt">&nbsp;</span>
		<span class="round rt">&nbsp;</span>
		<span class="round lb">&nbsp;</span>
		<span class="round rb">&nbsp;</span>
		<div class="container_area">
			<!--<h2 class="tit_h2">오수/전력 사용량</h2>-->
				<jsp:include page="../include/navi.jsp" />
				<span class="ico_print"><a href="#print"  onclick="printPage('<c:url value="/common/printView.do" />');return false;"><img src="/htmlRes/images/ico_print.jpg" alt="인쇄버튼"></a></span>
				<div class="content_wrap">
					<div class="con_left">
						<h2 class="tit_h2">현장명 <span class="pointReUd">${mainInfo.area_name } 휴게소 오수처리시설</span></h2>
						<dl class="zone_info">
							<dt>소재지</dt>
							<dd>${mainInfo.area_addr }</dd>
							<dt>시설용량</dt>
							<dd>${mainInfo.area_capa } ㎥/일</dd>
							<dt>시공사</dt>
							<dd>${mainInfo.builder }</dd>
							<dt>준공일자</dt>
							<dd>${mainInfo.build_date }</dd>
							<dt>용역기간</dt>
							<dd>${mainInfo.serv_sdate } ~ ${mainInfo.serv_edate }</dd> 
						</dl>
						<div class="respon_info">
							<h2 class="tit_h2">담당자</h2>
							<div class="respon_box">
								<p class="left_img">
									<c:if test="${empty mainInfo.admin_pic }">
										<img src="/htmlRes/images/img_thum01.jpg" alt="담당자 사진" />
									</c:if>
									<c:if test="${not empty mainInfo.admin_pic }">
										<img src="<c:url value='${mainInfo.admin_pic }' />" alt="${mainInfo.admin_name }"/>
									</c:if>
								</p>
								<ul class="right_text">
									<li class="name_style"><span>${mainInfo.admin_name }</span>${mainInfo.admin_hp }</li>
									<li class="bul_style"><span>전화번호</span>${mainInfo.admin_tel }</li>
									<li class="bul_style"><span>이메일</span>${mainInfo.admin_email }</li>
								</ul>
							</div>
						</div>
						<h2 class="tit_h2">자격증</h2>
						<ul class="license_info">
							<c:set var="certCnt" value="0"/>
							<c:forEach var="certList" items="${mainInfo.userCertVOList }" varStatus="status">
								<c:if test="${not empty certList.sac_cert_name }">
									<c:set var="certCnt" value="${certCnt+1 }"/>
									<li>${certList.sac_cert_name } / ${certList.sac_cert_publish } / ${certList.sac_cert_date }</li>
								</c:if>
							</c:forEach>
							<c:if test="${certCnt eq 0}">
								자격증이 없습니다.
							</c:if>
						</ul>
						<h2 class="tit_h2">경력 사항</h2>
						<dl class="career_info">
							<c:set var="careerCnt" value="0"/>
							<c:forEach var="careerList" items="${mainInfo.userCareerVOList }" varStatus="status">
								<c:if test="${not empty careerList.sac_com_name }">
								<c:set var="careerCnt" value="${careerCnt+1 }"/>
									<dt>${careerList.sac_com_name }</dt>
									<dd>${careerList.sac_biz_period }</dd>
								</c:if>
							</c:forEach>
							<c:if test="${careerCnt eq 0}">
								경력 사항이 없습니다.
							</c:if>
						</dl>
						<h2 class="tit_h2">휴게소 </h2>
						<p class="tel_point">T ${mainInfo.area_tel } / F ${mainInfo.area_fax }</p>
						<dl class="restA_info">
							<c:if test="${not empty mainInfo.serviceAreaManagerVOList }">
								<c:forEach var="serviceAreaManagerList" items="${mainInfo.serviceAreaManagerVOList }" varStatus="status">
									<dt>${serviceAreaManagerList.ssm_job_title } ${serviceAreaManagerList.ssm_manager_name }</dt>
									<dd>T ${serviceAreaManagerList.ssm_manager_tel }</dd>
								</c:forEach>
							</c:if>
						</dl>
					</div><!--//con_left-->

					<div class="con_right">
						<div class="srch_wrap">
							 <form name="listForm" id="listForm" method="post" action="<c:url value='/main.do'/>">
								<fieldset>
									<legend>키워드 검색 조회 영역</legend>
									<label for="searchSdate">기간 </label><input type="text" id="searchSdate" name="searchSdate" value="${mainVO.searchSdate }"/> - <input type="text" id="searchEdate" name="searchEdate" value="${mainVO.searchEdate }">
									<a href="<c:url value='/main.do'/>" onclick="searchForm();return false;" class="btn_srch">검색</a>
								</fieldset>
							</form>
						</div>
						<div class="graph_area">
							<c:if test="${not empty chartInfo }">
							<c:forEach var="chartMap" items="${chartInfo }">
								<c:if test="${chartMap.key ne 'waterQualityChart'}">
									<div class="graph_header"></div>
									<span class="view_more"><a href="<c:url value='/daily/waterElect.do' />?searchSdate=${mainVO.searchSdate }&amp;searchEdate=${mainVO.searchEdate }">더보기</a></span>
									<div id="${chartMap.key }" class="graph_box">${chartMap.value }</div>
								</c:if>
								<c:if test="${chartMap.key eq 'waterQualityChart'}">
									<div class="graph_header"></div>
									<c:if test="${unusualYn eq 'Y' or empty unusualYn}"><span class="green">보통</span></c:if>
									<c:if test="${unusualYn eq 'N'}"><span class="red">심각</span></c:if>
									<span class="view_more type_water"><a href="<c:url value='/daily/waterQuality.do' />?searchSdate=${mainVO.searchSdate }&amp;searchEdate=${mainVO.searchEdate }">더보기</a></span>
									<div id="${chartMap.key }" class="graph_box">${chartMap.value }</div>
								</c:if>
							</c:forEach>
							</c:if>
							<c:if test="${empty chartInfo }">
								<div class="graph_header"></div>
								<div id="waterIOChart" class="graph_box"></div>
								<div class="graph_header"></div>
								<div id="electChart" class="graph_box"></div>
								<div class="graph_header"></div>
								<div id="waterQualityChart" class="graph_box"></div>
							</c:if>
						</div><!--//graph_area-->
						<div class="etc_area">
							<h2 class="tit_h2">특이사항 </h2>
							<ul class="etc_note">
								<li>${unusualCont }</li>
							</ul>
						</div>
					</div><!--//con_right-->
				</div><!--//content_wrap-->
		
		</div><!--//container_area-->
	</div>

	<!-- contents e -->
<jsp:include page="../include/footer.jsp" />